<%@page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>事件跟踪登记</title>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<%@ include file="/commons/dateTime.jsp"%>
<%@ include file="/commons/validation.jsp"%>

<script type="text/javascript">
	function setButtonStatus(status){ //设置按钮得状态  true为可用   false为不可用
		$("btn1_12").disabled = !status;
		$("btn1_32").disabled = !status;
	}
	function submitForm(){
		var flag = $("trackRecordFrom").fireEvent("onsubmit");
		if(!flag)  return;

		$("mySubmit").click();
	}
	function flushMain(){
		findFrame("trackRecordFrame").flushFrame();;
	}

  function selectPerson(){ //选择人
  	var url = "${ctx}/common_employeeQuery.do?method=initSelectPsrsonMain";
  	url += "&frameName=trackRecordAddFrame";
  	url += "&callBack=selectPersonCallBack";
  	url += "&multiple=false";
	top.windowOpen(url, "selectPerson", "选择人", 530, 700,true,"selectPerson");
  }

  function selectPersonCallBack(info){
  	var onePerson = info.split(",");
     $("recorder").value = onePerson[1];
  }
</script>
</head>

<body>
<iframe id="showResult" name="showResult" style="display:none" onload="setButtonStatus(true);"></iframe>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><span class="window_head_intext"><img src="${ctx}/images/ico_Advance.gif" align="absmiddle" /> 事件跟踪登记</span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td colspan="2" class="content">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      	<form id="trackRecordFrom" method="post" class="required-validate" target="showResult"
      			action="${ctx}/customerService_trackRecordAction.do?method=addQuestionair" >
      	<input id="mySubmit" name="mySubmit"  type="submit"  style="display:none">

      	<input type="hidden" name="customerServiceEventID" value="${custServiceEventVO.keyword}">
        <td class="aux_outtable_color">
		<div>
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
		<tr>
              <td class="aux_intable_td1">跟踪人：</td>
              <td class="aux_intable_require"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>
                  	<input id="recorder" name="recorder" type="text" class="inputtext validate-char required" afterInsert="recorderError" value="" size="16"  maxlength="36"/>

                  </td>
                  <td width="4">&nbsp;</td>
                  <td>
                  	<a href="#"  onClick="selectPerson();" onFocus="this.blur()">
                  		<img src="${ctx}/images/ico_cz.gif" width="16" height="16" border="0" />
                    </a>
                    <span id="recorderError"></span>
                  </td>
                </tr>
              </table></td>
              <td class="aux_intable_td1">日 期：</td>
              <td class="aux_intable_require">
              <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>
                  	<input id="recordTime" name="recordTime" type="text" class="inputtext validate-char validate-date required" afterInsert="recordTimeError" value="" size="16" />
                  </td>
                  <td width="4">&nbsp;</td>
                  <td>
                  	<img id="imgButtonRecordTime" src="${ctx}/images/ico_date.gif" width="20" height="20" />
                  	<span id="recordTimeError"></span>
                  </td>
                </tr>
              </table></td>
          </tr>
          <tr>
			<td class="aux_intable_td1">跟踪方式：</td>
            <td class="aux_intable_td2">
   				<pms:unitedSelect name="returnVisitWayID"
							style="width:110px;"
							dataList="${returnVisitWayList}"
							optionLabel="name"
							optionValue="keyword"
							selectText="请选择...">
   				</pms:unitedSelect>
			</td>
            <td width="5%" class="aux_intable_td1">联系人：</td>
            <td width="10%" class="aux_intable_td2">
            	${custServiceEventVO.contact}
            	<input type="hidden" name="client" value="${custServiceEventVO.contact}">
            </td>
          </tr>
          <tr>
            <td class="aux_intable_td1">房号：</td>
            <td class="aux_intable_td2">
            	${custServiceEventVO.houseNumber}
            	<input type="hidden" name="houseNumber" value="${custServiceEventVO.houseNumber}">
            	<input type="hidden" name="houseID" value="${custServiceEventVO.houseKeyword}">
            </td>
            <td class="aux_intable_td1">详细地点：</td>
            <td class="aux_intable_td2">
            	${custServiceEventVO.fullAddress}
            	<input type="hidden" name="fullAddress" value="${custServiceEventVO.fullAddress}">
            </td>
          </tr>

          <tr>
            <td valign="top" class="aux_intable_td1">描 述：</td>
            <td colspan="5" class="aux_intable_td2">
              	<textarea name="remark" cols="46" rows="3" class="textareatext validate-char max-length-100" validateChar="$"></textarea>
             </td>
            </tr>

        </table>
		</div></td>
		</form>
      </tr>
    </table></td>
  </tr>
  <tr>

    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="buttonOffLeft" id="btn1_11"></td>
            <td class="buttonOffMiddle" id="btn1_12" onClick="submitForm();" onMouseOver="btn_change_over(1)" onMouseOut="btn_change_out(1)" onBlur="btn_change(1)"><img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom" />保 存</td>
            <td class="buttonOffRight" id="btn1_13"></td>
          </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom" />关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>
<script type="text/javascript">
              Calendar.setup(
              {
	              inputField : "recordTime", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "imgButtonRecordTime", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
</script>
</body>
</html>